package com.yc.controller;

import com.yc.bean.FoodTypeBean;
import com.yc.model.ResponseResult;
import com.yc.service.FoodTypeBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zwei
 * @create 2024-10-07 15:12
 */
@RestController
@RequestMapping("/food")
public class FoodTypeController {
    private final FoodTypeBiz foodTypeBiz;
    @Autowired
    public FoodTypeController(FoodTypeBiz foodTypeBiz) {
        this.foodTypeBiz = foodTypeBiz;
    }
    @RequestMapping("/getFoodType")
    public ResponseResult getFoodType(){
        List<FoodTypeBean>list=foodTypeBiz.getFoodType();
        return ResponseResult.ok().setData(list);
    }
}
